package Algorithm;

public class LC167 {
    public int[] twoSum(int[] numbers, int target) {
        int i=0,j=numbers.length-1;
        while(i<j){
            int mid=(j-i)/2+i;
            if(numbers[i]+numbers[j]>target) j--;
            else if(numbers[i]+numbers[j]<target) i++;
            else return new int[]{i+1,j+1};
        }
        return new int[]{-1,-1};
    }
}
